package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkCustomerManageDetail;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkCustomerManageDetailVo;
import com.ruoyi.logistic.mapper.NetworkCustomerManageDetailMapper;
import com.ruoyi.logistic.service.NetworkCustomerManageDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NetworkCustomerManageDetailServiceImpl implements NetworkCustomerManageDetailService {
    @Autowired
    private NetworkCustomerManageDetailMapper networkCustomerManageDetailMapper;
    @Override
    public List<NetworkCustomerManageDetail> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkCustomerManageDetailMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkCustomerManageDetail networkCustomerManageDetail) {
        return networkCustomerManageDetailMapper.insert(networkCustomerManageDetail);
    }

    @Override
    public Boolean update(NetworkCustomerManageDetail networkCustomerManageDetail) {
        return networkCustomerManageDetailMapper.update(networkCustomerManageDetail);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkCustomerManageDetailMapper.deleteById(id);
    }

    @Override
    public List<NetworkCustomerManageDetail> search(NetworkCustomerManageDetailVo networkCustomerManageDetailVo) {
        PageHelper.startPage(networkCustomerManageDetailVo.getPageDate());
        return networkCustomerManageDetailMapper.search(networkCustomerManageDetailVo);
    }
}
